jQuery(document).ready(function () {
    TableManaged.init();
});
$("#info_disabled,#info_res,#info_delete").click(function () {
    var act = $(this).attr('id');
    if (act == 'info_disabled') {
        act = 0;
    }
    if (act == 'info_res') {
        act = 1;
    }
    if (act == 'info_delete') {
        act = -1;
    }
    var ids = $("span[class='checked'] input").serialize();
    ids = decodeURIComponent(ids, true);
    $.ajax({
        url: '/role/set',
        type: 'POST',
        data: {ids: ids, act: act},
        dataType: 'JSON',
        cache: false,
        success: function (json) {
            dshow(json.message);
            if (json.code == 2000) {
                window.location.href = '/role';
            }
        }
    });
});